var path=require('path');
var webpack=require('webpack');
var HtmlwebpackPlugin=require('html-webpack-plugin');

var ROOT_PATH=path.resolve(__dirname);
var APP_PATH=path.resolve(ROOT_PATH,'app');
var BUILD_PATH=path.resolve(ROOT_PATH,'build');


module.exports ={
  devtool:'eval-source-map',
  entry:path.join(__dirname,'app/index.js'),
  output:{
    path:BUILD_PATH,
    filename:'bundle.js'
  },
  module: {
    loaders: [{
      test: /\.js?$/,
      exclude: /node_modules/,
      loader: 'babel'
    }]
  },
  devServer:{
    historyApiFallback:true,
    hot:true,
    inlien:true,
    progress:true,
  },
    resolve: {
        extensions: ['', '.js', '.jsx']
    },
  plugins:[
    new HtmlwebpackPlugin({
      title:'Hello World app'
    })
  ]

};